# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-mechanize
_pkgname=mechanize
pkgver=0.4.5
pkgrel=2
epoch=1
pkgdesc='Stateful programmatic web browsing..'
url='https://pypi.org/project/mechanize/#files'
arch=('any')
license=('BSD')
depends=('python2' 'python2-html5lib')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('51706d5c073501d02fb7395eda30625ed9191324f948073c7d1589df0e507d8b7641ca514ceff55e7d82e899ba6e10c55507c79668976c7654ff0004671d09d2')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

